package com.android.fastride.exception;

/**
 * 和服务器交互发生的异常
 * Created by pengyuantao on 2017/9/26 9:54.
 */
public class ResponseException extends RuntimeException {

//	public static final String MESSAGE = "错误码：%d,错误信息：%s";
	public static final String MESSAGE = ",%s(%d)";

	//错误码
	private int code;

	//错误信息
	private String info;

	private String result;

	public ResponseException (int code,String info) {
		super(String.format(MESSAGE, info, code));
		this.info = info;
		this.code = code;
	}

	public int getCode() {
		return code;
	}

	public String getInfo() {
		return info;
	}
}
